<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="/WEB-INF/mytag.tld" prefix="my" %>
<div class="pageHeader">
    <form id="pagerForm" method="post" action="${alias}/list.do" onsubmit="return navTabSearch(this);">
        <input type="hidden" name="status" value="${r"${"}pager.status}"/>
        <input type="hidden" name="keywords" value="${r"${"}pager.keywords}"/>
        <input type="hidden" name="pageNum" value="${r"${"}pager.pageNum}"/>
        <input type="hidden" name="numPerPage" value="${r"${"}pager.numPerPage}"/>
        <div class="searchBar">
            <table class="searchContent">
                <tbody><tr><td>
                    <input name="" class="textInput" value=""/>
                </td><td><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></td></tr>
                </tbody></table></div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a href="${alias}/new.do" target="navTab" rel="${toEntityName }AddPage" class="add"><span>新增</span></a></li>
            <li><a href="${alias}/remove.do?pageNum=${r"${"}pager.pageNum }&id={idstring}"
                   target="ajaxTodo" class="delete" title="确定要删除所选记录吗？"><span>删除</span></a></li>
            <li><a href="${alias}/edit.do?pageNum=${r"${"}pager.pageNum }&id={idstring}"
                   target="navTab" rel="${toEntityName }EditPage" class="edit"><span>修改</span></a></li>
            <li><a href="${alias}/info.do?pageNum=${r"${"}pager.pageNum }&id={idstring}"
                   target="navTab" rel="${toEntityName }ViewPage" class="icon"><span>查看</span></a></li></ul>
    </div>
    <table class="table" width="100%" layoutH="113">
        <thead>
        <tr><#list fields as field><th>${field.toLabelName }</th></#list></tr>
        </thead>
        <tbody>
        <c:forEach items="${r"${"}${toEntityName }List }" var="lo">
            <tr target="idstring" rel="<#if primeType!=toClassName><#list primtives as prime>${r"${"}lo.${prime.name}}<#if prime_has_next>,</#if></#list><#else><#list fields as field>${r"${"}lo.${field.name}}<#if field_has_next>,</#if></#list></#if>">
            <#list fields as field><td>${r"${"}lo.${field.name} }</td></#list>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
			<span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="4" ${r"${"}pager.numPerPage == 4?"selected":""}>4</option>
                <option value="20" ${r"${"}pager.numPerPage == 20?"selected":""}>20</option>
                <option value="100" ${r"${"}pager.numPerPage == 100?"selected":""}>100</option>
                <option value="200" ${r"${"}pager.numPerPage == 200?"selected":""}>200</option>
			</select>
			共${r"${"}pager.total }条，共${r"${"}pager.pageTotal}页</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${r"${"}pager.total}" numPerPage="${r"${"}pager.numPerPage}" pageNumShown="10" currentPage="${r"${"}pager.pageNum}"></div>
    </div>
</div>
